import request from './request'

//侧边栏菜单获取
export function getMainMenu() {
  return request({
    method: 'get',
    url: '/base/getMainMenu'
  })
}

export function resetPassword(prevPas: string, newPas: string) {
  return request({
    method: 'patch',
    url: '/base/updatePassword',
    data: {
      previousPassword: prevPas,
      newPassword: newPas
    },
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export function getNews(number: number) {
  return request({
    method: 'get',
    url: `/base/getNews`,
    params: {
      number: number
    }
  })
}

export function getAcademyList() {
  return request({
    method: 'get',
    url: '/base/getAcademyList'
  })
}
